.class public Lcom/zuiapps/common/feedback/ContactActivity;
.super Landroid/app/Activity;
.source "ContactActivity.java"


# static fields
.field private static final KEY_UMENG_CONTACT_INFO_PLAIN_TEXT:Ljava/lang/String; = "plain"


# instance fields
.field private agent:Lcom/umeng/fb/FeedbackAgent;

.field private backBtn:Landroid/widget/ImageButton;

.field private contactInfoEdit:Landroid/widget/EditText;

.field private lastUpdateAtText:Landroid/widget/TextView;

.field private saveBtn:Landroid/widget/ImageButton;


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 35
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    return-void
.end method

.method static synthetic access$000(Lcom/zuiapps/common/feedback/ContactActivity;)Landroid/widget/EditText;
    .registers 2
    .param p0, "x0"    # Lcom/zuiapps/common/feedback/ContactActivity;

    .prologue
    .line 35
    iget-object v0, p0, Lcom/zuiapps/common/feedback/ContactActivity;->contactInfoEdit:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$100(Lcom/zuiapps/common/feedback/ContactActivity;)V
    .registers 1
    .param p0, "x0"    # Lcom/zuiapps/common/feedback/ContactActivity;

    .prologue
    .line 35
    invoke-direct {p0}, Lcom/zuiapps/common/feedback/ContactActivity;->back()V

    return-void
.end method

.method static synthetic access$200(Lcom/zuiapps/common/feedback/ContactActivity;)Lcom/umeng/fb/FeedbackAgent;
    .registers 2
    .param p0, "x0"    # Lcom/zuiapps/common/feedback/ContactActivity;

    .prologue
    .line 35
    iget-object v0, p0, Lcom/zuiapps/common/feedback/ContactActivity;->agent:Lcom/umeng/fb/FeedbackAgent;

    return-object v0
.end method

.method static synthetic access$300(Lcom/zuiapps/common/feedback/ContactActivity;)Landroid/widget/ImageButton;
    .registers 2
    .param p0, "x0"    # Lcom/zuiapps/common/feedback/ContactActivity;

    .prologue
    .line 35
    iget-object v0, p0, Lcom/zuiapps/common/feedback/ContactActivity;->saveBtn:Landroid/widget/ImageButton;

    return-object v0
.end method

.method private back()V
    .registers 3

    .prologue
    .line 164
    invoke-virtual {p0}, Lcom/zuiapps/common/feedback/ContactActivity;->finish()V

    .line 167
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/4 v1, 0x4

    if-le v0, v1, :cond_f

    .line 168
    sget v0, Lcom/zuiapps/common/feedback/R$anim;->umeng_fb_finish_activity_in:I

    sget v1, Lcom/zuiapps/common/feedback/R$anim;->umeng_fb_finish_activity_out:I

    invoke-virtual {p0, v0, v1}, Lcom/zuiapps/common/feedback/ContactActivity;->overridePendingTransition(II)V

    .line 170
    :cond_f
    return-void
.end method


# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
    .registers 12
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    .line 57
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 58
    const/4 v6, 0x1

    invoke-virtual {p0, v6}, Lcom/zuiapps/common/feedback/ContactActivity;->requestWindowFeature(I)Z

    .line 59
    sget v6, Lcom/zuiapps/common/feedback/R$layout;->umeng_fb_activity_contact:I

    invoke-virtual {p0, v6}, Lcom/zuiapps/common/feedback/ContactActivity;->setContentView(I)V

    .line 60
    new-instance v6, Lcom/umeng/fb/FeedbackAgent;

    invoke-direct {v6, p0}, Lcom/umeng/fb/FeedbackAgent;-><init>(Landroid/content/Context;)V

    iput-object v6, p0, Lcom/zuiapps/common/feedback/ContactActivity;->agent:Lcom/umeng/fb/FeedbackAgent;

    .line 62
    sget v6, Lcom/zuiapps/common/feedback/R$id;->umeng_fb_back:I

    invoke-virtual {p0, v6}, Lcom/zuiapps/common/feedback/ContactActivity;->findViewById(I)Landroid/view/View;

    move-result-object v6

    check-cast v6, Landroid/widget/ImageButton;

    iput-object v6, p0, Lcom/zuiapps/common/feedback/ContactActivity;->backBtn:Landroid/widget/ImageButton;

    .line 63
    sget v6, Lcom/zuiapps/common/feedback/R$id;->umeng_fb_save:I

    invoke-virtual {p0, v6}, Lcom/zuiapps/common/feedback/ContactActivity;->findViewById(I)Landroid/view/View;

    move-result-object v6

    check-cast v6, Landroid/widget/ImageButton;

    iput-object v6, p0, Lcom/zuiapps/common/feedback/ContactActivity;->saveBtn:Landroid/widget/ImageButton;

    .line 64
    sget v6, Lcom/zuiapps/common/feedback/R$id;->umeng_fb_contact_info:I

    invoke-virtual {p0, v6}, Lcom/zuiapps/common/feedback/ContactActivity;->findViewById(I)Landroid/view/View;

    move-result-object v6

    check-cast v6, Landroid/widget/EditText;

    iput-object v6, p0, Lcom/zuiapps/common/feedback/ContactActivity;->contactInfoEdit:Landroid/widget/EditText;

    .line 65
    sget v6, Lcom/zuiapps/common/feedback/R$id;->umeng_fb_contact_update_at:I

    invoke-virtual {p0, v6}, Lcom/zuiapps/common/feedback/ContactActivity;->findViewById(I)Landroid/view/View;

    move-result-object v6

    check-cast v6, Landroid/widget/TextView;

    iput-object v6, p0, Lcom/zuiapps/common/feedback/ContactActivity;->lastUpdateAtText:Landroid/widget/TextView;

    .line 68
    :try_start_3b
    iget-object v6, p0, Lcom/zuiapps/common/feedback/ContactActivity;->agent:Lcom/umeng/fb/FeedbackAgent;

    invoke-virtual {v6}, Lcom/umeng/fb/FeedbackAgent;->getUserInfo()Lcom/umeng/fb/model/UserInfo;

    move-result-object v6

    invoke-virtual {v6}, Lcom/umeng/fb/model/UserInfo;->getContact()Ljava/util/Map;

    move-result-object v6

    const-string v7, "plain"

    invoke-interface {v6, v7}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    .line 69
    .local v0, "contactInfo":Ljava/lang/String;
    iget-object v6, p0, Lcom/zuiapps/common/feedback/ContactActivity;->contactInfoEdit:Landroid/widget/EditText;

    invoke-virtual {v6, v0}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 71
    iget-object v6, p0, Lcom/zuiapps/common/feedback/ContactActivity;->agent:Lcom/umeng/fb/FeedbackAgent;

    invoke-virtual {v6}, Lcom/umeng/fb/FeedbackAgent;->getUserInfoLastUpdateAt()J

    move-result-wide v4

    .line 73
    .local v4, "time":J
    const-wide/16 v6, 0x0

    cmp-long v6, v4, v6

    if-lez v6, :cond_cc

    .line 74
    new-instance v1, Ljava/util/Date;

    invoke-direct {v1, v4, v5}, Ljava/util/Date;-><init>(J)V

    .line 75
    .local v1, "date":Ljava/util/Date;
    invoke-virtual {p0}, Lcom/zuiapps/common/feedback/ContactActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v6

    sget v7, Lcom/zuiapps/common/feedback/R$string;->umeng_fb_contact_update_at:I

    invoke-virtual {v6, v7}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    .line 76
    .local v3, "prefix":Ljava/lang/String;
    iget-object v6, p0, Lcom/zuiapps/common/feedback/ContactActivity;->lastUpdateAtText:Landroid/widget/TextView;

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v7, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-static {}, Ljava/text/SimpleDateFormat;->getDateTimeInstance()Ljava/text/DateFormat;

    move-result-object v8

    invoke-virtual {v8, v1}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 77
    iget-object v6, p0, Lcom/zuiapps/common/feedback/ContactActivity;->lastUpdateAtText:Landroid/widget/TextView;

    const/4 v7, 0x0

    invoke-virtual {v6, v7}, Landroid/widget/TextView;->setVisibility(I)V

    .line 82
    .end local v1    # "date":Ljava/util/Date;
    .end local v3    # "prefix":Ljava/lang/String;
    :goto_91
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v6

    if-eqz v6, :cond_d9

    .line 83
    iget-object v6, p0, Lcom/zuiapps/common/feedback/ContactActivity;->saveBtn:Landroid/widget/ImageButton;

    sget v7, Lcom/zuiapps/common/feedback/R$drawable;->umeng_fb_titlebar_finish_disabled:I

    invoke-virtual {v6, v7}, Landroid/widget/ImageButton;->setImageResource(I)V

    .line 88
    :goto_9e
    new-instance v6, Landroid/os/Handler;

    invoke-direct {v6}, Landroid/os/Handler;-><init>()V

    new-instance v7, Lcom/zuiapps/common/feedback/ContactActivity$1;

    invoke-direct {v7, p0}, Lcom/zuiapps/common/feedback/ContactActivity$1;-><init>(Lcom/zuiapps/common/feedback/ContactActivity;)V

    const-wide/16 v8, 0x1f4

    invoke-virtual {v6, v7, v8, v9}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
    :try_end_ad
    .catch Ljava/lang/NullPointerException; {:try_start_3b .. :try_end_ad} :catch_d4

    .line 104
    .end local v0    # "contactInfo":Ljava/lang/String;
    .end local v4    # "time":J
    :goto_ad
    iget-object v6, p0, Lcom/zuiapps/common/feedback/ContactActivity;->backBtn:Landroid/widget/ImageButton;

    new-instance v7, Lcom/zuiapps/common/feedback/ContactActivity$2;

    invoke-direct {v7, p0}, Lcom/zuiapps/common/feedback/ContactActivity$2;-><init>(Lcom/zuiapps/common/feedback/ContactActivity;)V

    invoke-virtual {v6, v7}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 111
    iget-object v6, p0, Lcom/zuiapps/common/feedback/ContactActivity;->saveBtn:Landroid/widget/ImageButton;

    new-instance v7, Lcom/zuiapps/common/feedback/ContactActivity$3;

    invoke-direct {v7, p0}, Lcom/zuiapps/common/feedback/ContactActivity$3;-><init>(Lcom/zuiapps/common/feedback/ContactActivity;)V

    invoke-virtual {v6, v7}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 140
    iget-object v6, p0, Lcom/zuiapps/common/feedback/ContactActivity;->contactInfoEdit:Landroid/widget/EditText;

    new-instance v7, Lcom/zuiapps/common/feedback/ContactActivity$4;

    invoke-direct {v7, p0}, Lcom/zuiapps/common/feedback/ContactActivity$4;-><init>(Lcom/zuiapps/common/feedback/ContactActivity;)V

    invoke-virtual {v6, v7}, Landroid/widget/EditText;->addTextChangedListener(Landroid/text/TextWatcher;)V

    .line 161
    return-void

    .line 79
    .restart local v0    # "contactInfo":Ljava/lang/String;
    .restart local v4    # "time":J
    :cond_cc
    :try_start_cc
    iget-object v6, p0, Lcom/zuiapps/common/feedback/ContactActivity;->lastUpdateAtText:Landroid/widget/TextView;

    const/16 v7, 0x8

    invoke-virtual {v6, v7}, Landroid/widget/TextView;->setVisibility(I)V
    :try_end_d3
    .catch Ljava/lang/NullPointerException; {:try_start_cc .. :try_end_d3} :catch_d4

    goto :goto_91

    .line 100
    .end local v0    # "contactInfo":Ljava/lang/String;
    .end local v4    # "time":J
    :catch_d4
    move-exception v2

    .line 101
    .local v2, "e":Ljava/lang/NullPointerException;
    invoke-virtual {v2}, Ljava/lang/NullPointerException;->printStackTrace()V

    goto :goto_ad

    .line 85
    .end local v2    # "e":Ljava/lang/NullPointerException;
    .restart local v0    # "contactInfo":Ljava/lang/String;
    .restart local v4    # "time":J
    :cond_d9
    :try_start_d9
    iget-object v6, p0, Lcom/zuiapps/common/feedback/ContactActivity;->saveBtn:Landroid/widget/ImageButton;

    sget v7, Lcom/zuiapps/common/feedback/R$drawable;->umeng_fb_title_finish_selector:I

    invoke-virtual {v6, v7}, Landroid/widget/ImageButton;->setImageResource(I)V
    :try_end_e0
    .catch Ljava/lang/NullPointerException; {:try_start_d9 .. :try_end_e0} :catch_d4

    goto :goto_9e
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .registers 4
    .param p1, "keyCode"    # I
    .param p2, "event"    # Landroid/view/KeyEvent;

    .prologue
    .line 174
    packed-switch p1, :pswitch_data_e

    .line 180
    invoke-super {p0, p1, p2}, Landroid/app/Activity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    :goto_7
    return v0

    .line 176
    :pswitch_8
    invoke-direct {p0}, Lcom/zuiapps/common/feedback/ContactActivity;->back()V

    .line 177
    const/4 v0, 0x1

    goto :goto_7

    .line 174
    nop

    :pswitch_data_e
    .packed-switch 0x4
        :pswitch_8
    .end packed-switch
.end method
